import React, { Component } from 'react'
import { Routes, Route, Navigate } from 'react-router-dom'

import NowPlaying from './films/NowPlaying'
import ComingSoon from './films/ComingSoon'

export default class Film extends Component {
  render() {
    return (
      <>
        <div className='swiper'>Film 轮播</div>
        <div>
          <Routes>
            <Route
              path='/nowPlaying'
              Component={NowPlaying}
            />
            <Route
              path='/comingSoon'
              Component={ComingSoon}
            />

            <Route
              path='/'
              element={<Navigate to='/film/nowPlaying' />}
            />
          </Routes>
        </div>
      </>
    )
  }
}
